added doubly_list and some minor changes