implemented learn method functionality