added new defrecord with defprotocols