Error estimation function were declared and implemented
No major changes were added