Refactor for LL#3