fixed bug. old code is for Extract Method