add condition to create httpstorage