add inplace unit tests