add public method and fix packages within classes