code reindentation and add some logs