split into 2 libs to come