random test generator added, front and frontInverse bug detected and fixed