made the package more flexible and easily imported into other projects