made some changes added attempt1