cosmetics: made function pure