LAMBDA-119: remove duplicate code