protocol methods in defrecord