improve coverage and tests