added hr function