model persistence implemented and tested