complete rewrite on multiple image uploads