adding code samples, including some that are pw protected