Use a dependency map instead of a dependency array