From Faux123 github for intellidemand