refactored crc