change to db datatype and code