move assignments into simple methods