Could this and above be refactored with a binary and?