added data structures to analyse images. selecting not working