lambda search first working version

optimizing attempt.