First version to solve the problem still not working