moved fields to method that uses them