beginning wrapper code