refactor for MEIPASS