removed extra fucntion from the code