added some syntax changes, and delete some test code