fixed exam fatory and add some patient helper tests