tidied rules a bit