implement for container
fixed @throws \InvalidArgument
update the docs