fixed tests + examples + small tweaks