added write/read protection and json functionality to model