learning helper refactored