adding "file" method for generation