tweak local size
Implemented calculating the local_size in a smarter fashion.