calculate steps