Added part4b and fixed spliting bug