tidied up the imdg code as it wasn't clicking on the correct bit