better -f detection