added toJSON
version 0.0.3