added better "container" checking
propogation of errors