Added turn functions and tests