added more step logic