frontend code for UBNext