added more negative index tests and helper functions.
fixed minor bug in previous