add method to clean up code