Final step for one-thread solution!