reorg some logic for better clarity
adding a unit/server test combo