fixes in dl_list and added matrix library