breaking code up into classes