rewrite for better consistency with ds3231 lib