refactoring input form & fix upload image