Factorize resource add