Removed printing to console for speed.