Updated documentation and added test