edited the code, removed extra lines