Fill out threshold function documentation