modified for exacts solns as output