bit of cleaning up code