functionality for arrow