add tostr func
minor changes in std