Added dispatch function for future improvements