Michael: add closed list implementation to func.c (segfaults)