working on probability distribution; has some generics problems