added a wait argument when creating a container