fixed silly code duplication