misc optimization moves