rewriting primitives to expose common functionality, making builder functions to be used by the compiler