tidy up the clustered se code a bit