changed match select query as data type 2 was causing prolbems