a bit of clean up code