moved filenaming stuff to its own module