rearranged core & back-end specific code (part 2)