add method name and fix small bugs