update code with method apis