refactored chunk loading code