method optimization