Added utilities, and timing functions