got rid of some unnecessary code