added a factory for creating custom progressbar