added dispatch block to improve rendering speed