changing plugin apis to accept unit criteria