updated to $.on() instead of the obsolete $.live()