add method and fix bug