use functional style and threading macro for finding allowed methods