gets 100% but too complicated and find bug errors