what does an attorney do