implement writing, reading and populating list from file