handling illegal inputs and legal inputs that are complete correctly
correctly handling incomplete tokens