Closed time like curves and the energy condtion in 2+1 dimensional gravity