add method() and fix errors