use switch statement for placing step dependant operations.