+ fix deflat()
+ add unit tests deflat()