refactor out controlLIstener