cleaned up code and added instructions on how to use