more efficient method