updated tests + fixes