change relation type from bool into int