Slight modification and added code for timmming
Added co-array version.