added tostring methods and fixed userdata representation