trying to get event loading right with phonegap