need a faster way of doing this!