better RTC implementation and sending number to serial port