add if and else and add likelihoods