using parse reading loop instead of stringreplace