added threshold commmand line argument