added missing err
using match instead of test