simplify __str__ and wait function