fixed code style and whitespaces