implement F_k