removed jQuery trigger and added global callback