refactored cap stages