refactor to actually support 2 images fix2 after review