fixed bug, verified instructor test case, added documentation
changed documentation to make input string format clearer