updated jastadd code