fixed errors

almost complete