add learn test code