added image pre-loading and numbering