improving code quality a bit