add partition code