refactor to actually support 2 images fix after review