added if statement to my awesome picture code