calling local function instead of triggering event