add readfile method