added hash and changed equality to allow array operations