using $ instead of jQuery (avoid jQuery undef issue)