tidied up var declaration