changed to_string method to work in ui