added HR function