adding a dispatch layer to clean up the client code