completed modifying and testing code. need to write documentation