updated api, added likelihood and update functions