toJSON() thing and first test cases