update code to Firebase 0.8