repaired errors deleted functions