Composite and Inverse functions