erased unnecessary lines in protocol, made some minor changes to the rest