change this a bit to be generic