added the normal method by comparing arrays