added comments, fixed runf_factor