New Sample Code solution