modified to make the program better in taking environment variables