modify buff logic