Kal Penn is coming back to TV.

The former House actor, who most recently appeared as a love interest for Robin on How I Met Your Mother, has landed a role on the CBS comedy pilot Ex-Men. He will play Gil, a man who lives in the rental complex at the center of the show. His character is said to have been caught having “the world’s worst affair,” and he now lives in the complex, waiting for the day his wife takes him back.

Penn will star alongside Chris Smith (Paranormal Activity 3) on show, which comes from HIMYM producer Rob Greenberg.