created Cost class with its methods