just some more code tidying