added functions to print lval to char*