started writing function to create prefix file