adding version 3 support