moved some pieces around to make it all more oop