Accelerating universe and scalar-tensor theories