init merge from Connor's code
merged with newest QS code
add protocol file