basic chunk and block generation

conversion to JSON is also included