changed isset() to !empty()