modifing main function