expanded check for box possibilities
more intelligent algorithm