Added test for rot_input function
Fixed bug in rot_input