moved private method