implement the read function for the embeding class.