Masters of Sex‘s Nick D’Agosto and Mixology‘s Andrew Santino have been cast as leads alongside Greta Gerwig, Drew Tarver and Krysta Rodriguez in CBS’ comedy pilot How I Met Your Dad, rounding out the How I Met Your Mother spinoff’s primary cast. In the vein of the original series, HIMYD tells the story from a female point of view, that of Sally (Gerwig), and revolves around a new group of friends in New York. D’Agosto, repped by UTA, Emerald Talent and SMGSB, will play Frank, the head of IT for Juliet’s (Rodriguez) fashion blog who falls for Sally. Santino, repped by CAA and Underground, will play Danny, Sally’s older brother, a perfect but uptight overachieving lawyer. Santino is billed as a guest star in the pilot as his casting is in second position to ABC’s midseason comedy Mixology, which has been soft in its first couple of airings. D’Agosto was a regular on the first season of Showtime’s Masters of Sex and will continue on the racy drama in a recurring capacity. The pilot, from 20th TV, was written by Emily Spivey and HIMYM creators Carter Bays and Craig Thomas and will be directed by Pam Fryman.

Related: 2014 CBS Pilots