implement persistence methods in model