By Logan

Code needs optimization for better performance.