Completed Problem 6-- added copy and paste functionality

And fixed an issue with expanding capacity.