using firebase API instead.