deform function done, need to be tested