load images method improved