trying to resolve segfault