all function covered, some details need to be done