organize everything into a class