add insert_direct and delete_direct functions