added mouse function to all modes