generalizing the package