added methods to clean up code