self init switched from scrip (doesn't work) to image onload