updated logic of waver amount