cleaning up the code after a review