added methods to resize data structures