added percentage option (loader bar functionality)