model & storage function finished