fixed bug + applied changes of protocol