added and fix bugs