modify read from file part in controller