check boundaries when getting and setting fields