updated example
added ability to close panel