adding protocol file and modifying the structs