Set capacity to be the parameter of constructor