added threshold parameters
updated model