using listeners to solve issue 302