structuring property checking code