preparing groud for avl tree implementation by separating common features