adding handling of different steps.