upated core program, added demo programs