main step logic

changed