not in place solution