Added resize and unittests