added more printing to figure out problem with segfault