added more documentation for each function
updated README to include documentation