removed dependency on arrays