more code for solution 3
updated iMac results