adding a custom function pmf