moved to an object oriented approach to keep things organized.