Added v2 type +realigned code