doing a little housecleaning
a little refactoring to make things easier to understand