fixed bug
removed some debug codes