tightening up some code stuff