added a check to not load already loadedimagres again