add Ankit's solution
assign value to arrows