added funtions to add listner to datasource