refactored and added bootstrap