change to only one method, and now accepts dynamics id and types