Fix find logic
Fix initialize bug and add tests