swapped order of code in image has attachment