define method api for game