fix for finding dirt logic (code is not in use yet)