A new approach to modified gravity models