Pedro Sanchez forms functioning government in Spain