bug fixed, tests still to proove