move useKbCheck to the top
move useKbCheck to the top, initialize vars, differentiate RT var names, IMPORTANT BUGFIX: NS logs at correct time (this bug was only in this function)