a bit of clean up and preparation