refactor brewcask