fixed a bug which now allows for programs with multiple facts