Refactored to make steps more consistent