implementation of rest and persistence layers.