refactor warden helper