replaced some fields with methods