changed: a bit of refactor here, there