[refac] moved expression logic to external class