sub generator & docs