updates
cleaned up code