working on classing out functionality