functions scripts and DB class added