Now it’s possible to set dynamically the number of bars