#cubic? implementation and tests