function moved from state to lts