implemented and tested unmatched function in cpp