change in getDoucment cloud function