main changed and render func written for Moving Objects