moved outline image onload to its own little function instead of wrapping the entire code block