added bucketing for psi calc