updated and applied code style