initial implementation of successive division algorithm