improve smartness, support docos better