add quote/base and refactor