solved 83 with modified algorithm from 82