refactor Search Insert Position