Ignition problem


I have a 2007 C230 Mercedes sport and when I put the key fob into the ignition it will not turn the keys on the key fob do not function as well I have replaced the batteries I do see the red light blinking when I do push the buttons but they are still not working so what more do I look for?