my solve code.