added the is_file function