solved #15 mathematically, may want to go back and find programmatic solution