initialise variable correctly