added per pc function - no more negative inputs