refactor code to use base class implementation

remove duplicated code in order to simplify maintenance