tidying up newly integrated code