fixed errors, removed unnessary lines