made code efficient
fixed conflict