fixed errors, not quite done