added all the insight code.