bootstrap refactored and runs in the server