trying to figure out this weird switching...