Germany headed for a snap election