Changed maxtarget formula