made the view listener work