used extend for less code duplication
better?