use local variables instead of global ones