tidied up directive