Remove temporary vars by changing private method