added cycle write to shared mem