trims some unnecessary code