just some python idioms etc.