Frequency Detection Implemented