added doc strings to all functions