template method complete mostly, need to comment and clean up