pass in hide function