the algorithm consists on two stages