start bootstrappin and refactoring base code