added first
added another test that showed a defect
added rest funciton
added cons function
name refactoring to remove parameter conflict with function