fixed compilererror
fixed to_string and from_string functions
code cleanup