Structure formation in modified gravity