debugged some stuff