remove usage of ifstream