eliminating the error step by step