performance improvements and added an elapsed time display