Tom refined the code getting ready for oop