please find a more efficient way to do this