cast name for query. Will have to change name type