write seeds. and fixed some bugs with reading ads
 write tests