Creating custom facts programmatically