add capcity method for queue