consolidated step logic