refactor the second variational likelihood class