now debugged some