adjusted to coding standard