reorder code for a bit of efficiency