Adapted original source code style