creating directories first