addprereq function done