tidied up typing