minor: rewrote fn nightly