check before ajax implement