guys, I came up with a efficient way( if it even works).