a few updates to get it testable