refactor with bootstrap and jquery