minor swift simplifications