Added framework for algorithm 03