Added reader functionality with tests