added arguments; changed functions
renamed history file, added missing func docstrings