implement reader and add test