fix the code - code is not working and reslove spacing issue