Added beforeStep