Prims and some changes