completed trace and solve methods, added tests