Implemented IF and ID in step()