removing dictionary calls and replacing with object fields