added sample conversion
aligned to new proto