modifed and refactored script
modifed and refactored script