added algorithm functionality\nadded traverse blocks function\nadded algorithm to maximize block