refactored helper for debate