added startlistening method to constructor