apparently swift can infer all of this