begining of selecting images