implement delete program function