refactory app model with with_options