worked out some bubugs, prints out results at bottom