implemented matches cells & num