changed delta logic