fixed function call and prettyprint for it