found bug in monotone function