improved doc and toString implementations