fixing arrow logic