trying out a simple implementation of classes, having some trouble with

overriding methods