FI is a bit of a pain to embed prolog in, still trying to figure it out