completed all functions except for remove_all