1. solve logic error