datastructures
TODO: checks + write to file