Updated algorithm

Working on speeding up Option #2