Added a function to easily use the module; Fixed an important bug