fixed some errors
removed debugging code
fixed very last error