trigger control - minor changes in readdata() lead to error