upload bugfix
refactoring