updated scripts and schema