solved the serial error when exceuting a block function