fixed initialization sequence
added backwards compatibility option
Merge pull request #5 from technobly/master

add option for V1 or V2