now load first valid image
clean code