Finished transform function