started working on displacement function