changing hide to function only