Accelerating universe in modified theories of gravity