Replace own functions with guava