added toObject and some very basic tests