Simulation shows how Moon might have formed 4.5 billion years ago