add end and over method
changed to_string method to work in ui