added step checks to see if we have reached step limit