trying to fix nidelven code