Added prepare phase
A different way of attacking #123