class base working