cassy: refactor