removed alot of unused variables