add: initial stuff for apply

from master