added print function (primitive)
added optimizations
blah