refactor long #to_s method