updated to reflect v0.3 beta
added invalid address check and debug info