couple of 'clean ups' to the logic