editied some code