refactor for rt1523g