tidies things up