Change algorithm for searching in sorted list. Added test lines