rectified Amit's errors :P