Add a learn method Fixes #3