metric function added