simple find reimplementation for educational purposes