[resolved #31]fixed bug. old code is for Extract Method