Corrected the code snippet using package listings