updated figures and edited section on algorithm.