jscs error and tests corrected