fixed naming and code style