another refactor of LS source