add direction and state