cleaned up some unnecessary logic