add primitive
separate implementation from header file