updated log_likelihood to work with _states_class