updated to work with latest version of angularfire