moved some logic to backstage pass object