improve coverage, change raised errors