fix bugs to make it run, added support files