added tests + coverage