tidied up variables