added write controller