changed user types to entities, added factorial function for eventual analysis for fitting P(k) functions