edited size and added offset global
manually fixed mergeconflict