Add pseudo-code but need to be review by you