making it write json