how to override function