Added global within function handler so requested vars are available