implemented basic algorithm to resize a model, still not working but on good way