updated to use angularfire