directory as constructor argument