ref #1: moved out get_files() method