working implementation of gigasecond