add cool tests and some other fixes