go through the algorithm part, draft version