made 640
cleaned up code