cleaned some code