extract some methods to override