added support for fp and normalized threshold values between 0-1