methods implementation and tests ok