pulled out upload and annotation handlers