Improved findall function