add isset() check on variables