refactor addTarget so it can be used for loading saved graph targets into the table