Add  and refactor  and  to use it