Multiple targets

I've amended the task a bit to support muti targets