added docstrings and function declarations to every function (didnt merge register though)