## 1 Introduction
These studies can provide insight into optimizing energy-saving measures for buildings. The results can be used as a base for designing building codes and standards [15; 16]. A case study of a retrofitted existing building in Brazil showed that the proposed guidelines and strategies can achieve net-zero energy buildings. Retrofitting was performed in many aspects of the building, such as air conditioning, lighting, office equipment, and installed photovoltaic (PV) systems, resulting in a reduction of energy consumption by up to 46% [17]. To retrofit residential buildings on an urban scale, a data-driven methodology was proposed as a generalized approach. It suggests key aspects of the retrofitted process to achieve large-scale operation [18]. Case studies of retrofitted buildings in Jordan on education building envelopes revealed that simple retrofitted strategies on building envelopes can achieve energy reduction by 54% and 5.5-year payback periods [19]. From a literature review, it can be seen that the application of newer energy-efficient technologies to existing buildings has a positive impact on both energy and economic aspects. This provides benefits to the project's owner in terms of reducing the energy cost and the electric utility in terms of increasing the efficiency in the electrical system. For the energy simulation software, BEC (building energy code) software has been used, support and approved for evaluating building energy performance in Thailand by the Ministry of Energy. It is an OTTV (overall thermal transfer value)-based energy estimation model for commercial buildings using a calculating parameter based on DOE-2.1E software combined with a database collected by the Department of Alternative Energy Development and Efficiency (DEDE) [20]. The main functionality is to calculated energy usage in aspect of envelope systems, lighting density, air conditioning system size and efficiency, other building equipment and whole building energy consumption in accordance with Thailandbuilding energy codes. When BEC software and other commonly used software such as VisualDOE, eQUEST, TRNSYS, EnergyPlus, etc., are compared, it can be seen that BEC software is easier for the user, while it maintains all aspects of calculation. However, there is a limitation in terms of the simulated effect of complex energy saving measured, which requires additional software for simulation [21]. In this study, we comprehensively analyzed retrofitting of existing buildings according to Thailand's building energy code using BEC software. Residential buildings located in Thailand were studied. Five aspects of the building were evaluated according to the building energy code: envelopes, lighting systems, air conditioning systems, renewable energy systems, and total energy consumption. The evaluation was conducted in terms of both energy and economic aspects to determine the feasibility of retrofitting existing buildings into energy-efficient buildings. Many studies focus on implementing energy savings measured in office building or household type in case of buildings in residential sectors into the zero-energy building. This research aims to focus on apartment-type residential buildings, which is the common type building stock that has been widely constructed in urban areas for low to middle income families in the region. Thus, the retrofitted result from case study buildings can be used as a guideline and can widely be applied to a large portion of existing residential buildings. Another reason for selecting residential buildings is the increase in working from home that has become common practice in various business sectors, which result in a significant rise in energy usage in residential sectors. However, many government and private sectors do not support employees in terms of energy costs that arise from working at home. Thus, the retrofitted process of this type of residential building, especially an apartment type with many units, into zero energy building can benefit building owners in terms of energy cost reduction.