so much refactoring. Add image upload