updating some code
cleaned up some code