move toggle function to a separate module