better modularisation of model and view creation