completed class that does not work well yet