added #prepare method