finished container methods, added exceptions and test cases