Better func detection