corrected wait times on Processing side; called functions on Javascript side