steps logic