replaced scripts with copies from new API package