added contracts in #whatResources to allow skipping callback and using only a promise as return value.