add code examples for traits