fix error in method