Implementation by C