moved some helpers around