finished documenting functions