hook all functions