inefficient solution