methods are stored in a dictionary so we can search

this will fix the wrong return type when we search