- implemented step by step