convert between long and string