data_listener function finished and for testing