the code is now working