refactor the first variational likelihood class