removed extra lines used for testing, cleaned the code