refactor checkIfNeedToDownload
refactored parser