need to implement func with the same sig - java