Updated code with reagard to new Classes