enrollment functionality and tests