removed unused code. split to regions