fixed split and added tests