added isValid function, updated to 0.1.0