updated to work with upload script