fixing bug in sugar method ,l