fixes string exercise to pass Mocha Tests