add stashes; refactor into classes