fixed Duration function
added functions prevZap and Duration to ztorage
fixed ztorage.ComputeDuration