updated codes to support latest angularfire version