few more changes
cleaned up code