add implementation for V4 with traditional training method