The standard model from extra dimensions