changing structure
separating protocol from commands library