refactored to meet requirements of jscs 2.0.1