added barSizeFactory class