compute objective and return it
added closure/inversion to posterior alignment