modified private func notation and set tab->space(4)
changed coding style and used loose coupling mode