Continued implementation of chew's algorithm