inlined the code samples