changed js for arrow