couple of more optimazations on image loading