added implementation for getSectionForPosition
added test implementation