implement download function and some bootstrap util classes