improving test coverage for toggle pattern
added initial documentation for toggle pattern