cleaning some code up