tidied up CI code