implement split file functionality