added calculations to optimize search. doesn't work yet
10d works
Merge branch 'master' of https://github.com/hyoshid1/project375