attribute test made into helper