extracting everything from shared into an interface, to ease unit testing later