Updated state diagram to use current inputs