fixing and styling code