added seconds,tenths logic.