merged code sample