updated with tests...which are failing
merge?
encapsulated