updated the logic of waver amount