implement variable initialization and array resizing