changes to make the program work finally