added amplitude with distance and new conditions