better partition handling