added preliminary read function