assignment 2 added, superassignment with caching and OOP concepts explored in R