added final comments
finished code