refactor Controller#displayTable