adapted according to code style