added migration script and json retrieval