refactored quotes into controller