fixed some stuff, close to finished