wrote better documentation