added support for arrays . resolves #16

Sample and test added as well.