updated values and added a serial print if needed