minor refactor (mostly syntax)