change argument delta=delta to delta=d