cleaned up: closed img tag, ifelse, empty line