Add reaction time function