refactor runner and protocol
Added magic protocol