adding edit markets functionality