changed function name from split to read