use interface instead of implementation for typehint