fix printing and add a spliter